package com.ruoyi.shopping_products.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shopping_products.mapper.PdCategoryMapper;
import com.ruoyi.shopping_products.domain.PdCategory;
import com.ruoyi.shopping_products.service.IPdCategoryService;

/**
 * 商品分类信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-23
 */
@Service
public class PdCategoryServiceImpl implements IPdCategoryService 
{
    @Autowired
    private PdCategoryMapper pdCategoryMapper;

    /**
     * 查询商品分类信息
     * 
     * @param id 商品分类信息主键
     * @return 商品分类信息
     */
    @Override
    public PdCategory selectPdCategoryById(Long id)
    {
        return pdCategoryMapper.selectPdCategoryById(id);
    }

    /**
     * 查询商品分类信息列表
     * 
     * @param pdCategory 商品分类信息
     * @return 商品分类信息
     */
    @Override
    public List<PdCategory> selectPdCategoryList(PdCategory pdCategory)
    {
        return pdCategoryMapper.selectPdCategoryList(pdCategory);
    }

    /**
     * 新增商品分类信息
     * 
     * @param pdCategory 商品分类信息
     * @return 结果
     */
    @Override
    public int insertPdCategory(PdCategory pdCategory)
    {
        return pdCategoryMapper.insertPdCategory(pdCategory);
    }

    /**
     * 修改商品分类信息
     * 
     * @param pdCategory 商品分类信息
     * @return 结果
     */
    @Override
    public int updatePdCategory(PdCategory pdCategory)
    {
        return pdCategoryMapper.updatePdCategory(pdCategory);
    }

    /**
     * 批量删除商品分类信息
     * 
     * @param ids 需要删除的商品分类信息主键
     * @return 结果
     */
    @Override
    public int deletePdCategoryByIds(Long[] ids)
    {
        return pdCategoryMapper.deletePdCategoryByIds(ids);
    }

    /**
     * 删除商品分类信息信息
     * 
     * @param id 商品分类信息主键
     * @return 结果
     */
    @Override
    public int deletePdCategoryById(Long id)
    {
        return pdCategoryMapper.deletePdCategoryById(id);
    }
}
